package com.neighbor.neighborhooduser.service.impl;

import com.neighbor.neighborhooduser.pojo.Messages;
import com.neighbor.neighborhooduser.dao.IMessagesDao;
import com.neighbor.neighborhooduser.service.IMessagesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户聊天消息表 服务实现类
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:13:04
 */
@Service
public class MessagesServiceImpl extends ServiceImpl<IMessagesDao, Messages> implements IMessagesService {

    @Autowired
    IMessagesDao messagesDao;


    /**
     *      根据用户提供的信息模糊查询聊天记录
     * @param userId    用户id
     * @param content  模糊信息
     * @return  聊天记录
     */
    @Override
    public List<Messages> selByFriend(Integer userId, String content) {
        return messagesDao.selByFriend(userId,content);
    }

}
